// umlaut_logger.cpp : main project file.

#include "stdafx.h"
#include "MainForm.h"

using namespace yoctolog_viewer;

void DoTest()
{
	yoctolog::Log::Instance().Initialize();
	yoctolog::Log::Instance().CreateMessageClass(0, "MessageClass1", "0xFF00FF", "0xFFFF00", true, true);
	yoctolog::Log::Instance().CreateMessageClass(1, "MessageClass2", "0x000000", "", true, true);
	for( int i = 0; i < 100; i++ )
	{
		YOCTOLOG(0, "Test1&Test3/Subgroup", "Test message %d", i);
		YOCTOLOG(1, "Test2&Test3/Subgroup", "Test message %d", i);
	}
}

[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
	// Enabling Windows XP visual effects before any controls are created
	Application::EnableVisualStyles();
	Application::SetCompatibleTextRenderingDefault(false); 

	if( args->Length > 0 && args[0]->CompareTo("--test") == 0 )
	{
		DoTest();
	}

	// Create the main window and run it
	Application::Run(gcnew MainForm());
	return 0;
}
